package com.beisita.web.controller;

import com.beisita.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MailController {

    @Autowired
    private MailService mailTool;

    @RequestMapping("/send")
    public String send() {
        mailTool.send();
        return "send success";
    }

    @RequestMapping("/sendHtml")
    public String sendHtml() {
        mailTool.sendHtml();
        return "sendHtml success";
    }

    @RequestMapping("/sendHtmlWithAttach")
    public String sendHtmlWithAttach() {
        mailTool.sendHtmlWithAttach();
        return "sendHtmlWithAttach success";
    }


}